var dzdak = {
	searchType:'',
	colname:'SWDJZ',
	nsrxx:'',
	width:800,
	height:600,
	initDzdak:function(){
		$("#nsrsbhRadio").attr("checked","checked");
		$("#taxpayerName").attr("readonly","readonly").css({"color":"#d3d3d3"});
	},
	changeRadio:function(name){
		if(name == 'nsrsbhRadio'){
			$("#nsrsbhRadio").attr("checked","checked");    
			$("#taxpayerName").attr("readonly","readonly").css({"color":"#d3d3d3"});
			$("#taxpayerId").removeAttr("readonly").css({"color":"black"}); 
		}else if(name == 'nsrmcRadio'){
			$("#nsrmcRadio").attr("checked","checked");
			$("#taxpayerId").attr("readonly","readonly").css({"color":"#d3d3d3"}); 
			$("#taxpayerName").removeAttr("readonly").css({"color":"black"});  
		}
		searchType = name;
	},
	getImage:function(){
		dzdak.nsrxx = $('#taxpayerId').val();
		if(dzdak.nsrxx == ''){
			//document.getElementById('taxpayerId').replace(/(^\s*)|(\s*$)/g, "").focus();
			alert('请先输入查询关键字');
			return;
		}
		$('#formPage').empty();
		var imgURL = config.baseURL + 'blob/getImage.action?colname='+dzdak.colname+'&nsrxx='+dzdak.nsrxx+'&width='+dzdak.width+'&height='+dzdak.height;
		$('#formPage').attr('src',imgURL);
	},
	getDzdaInfo:function(){
    	if($('#taxpayerId').val()){
    		$.ajax({
	            type: "GET",
	            url: config.baseURL + "common/sendHttp.action",
	            cache:false,
	            dataType: "xml",
	            data : {
	                "url":config.interfaceCenterBaseURL + "/interface/getTaxpayerInfo.action",
	                "taxpayer":$('#taxpayerId').val(),
	                "typeId":$('#imageName', document.frames('formImage').document).val()
	            },
	            success: function(xml){
	            	$(xml).find("resultInfo").each(function(i){
	                    var name = $(this).attr("name");
	                    var value = $(this).text();
	                    if(name == "swdjz"){
	                    	$('#dzdaImg').attr('src',config.baseURL+"blob/getImage.action?colname=SWDJZ&nsrxx=622101925088083");
	                    }
	                });
	            }
       		});
    	}
	}
}